#!/usr/bin/env node

const http = require('http'),
      log  = console.log;

http.createServer((req, res) =>{
    //log(`${req.method} ${req.url} HTTP/${req.httpVersion}`);
    log(req.headers); //打印请求头

    //log(req.headers.host);
    //log(req.headers['user-agent']);
    

    

    res.end('ok');
}).listen(8080);
